Export full search index as text#7040
Conversation
| deleteFolderAndVerifyNoResults(); | ||
| exportSearchIndexAndVerifyResults(); |
There was a problem hiding this comment.
This should check the search index before deleting the folder.
There was a problem hiding this comment.
Thanks, will do.
labkey-danield
left a comment
There was a problem hiding this comment.
Wouldn't hurt to run a couple of the search test on TeamCity to verify this works.
| @Override | ||
| @LogMethod | ||
| protected void doVerifySteps() | ||
| protected void doVerifySteps() throws IOException, CommandException |
There was a problem hiding this comment.
I don't think this throws a CommandException. exportSearchIndexAndVerifyResults throws only an IOException.
There was a problem hiding this comment.
OK, I'll clear those out
|
|
||
| @Test | ||
| public void testSearch() | ||
| public void testSearch() throws IOException, CommandException |
There was a problem hiding this comment.
Similarly you shouldn't need a CommandException.
| checker().wrapAssertion(() -> Assertions.assertThat(fileRowCount) | ||
| .as("expect minimum 2000 rows") | ||
| .isGreaterThan(2000)); |
There was a problem hiding this comment.
Where did this 2000 rows come from?
What if this is the first test, or only test, to run?
If you got this number from a local run I would suggest that you run against a bootstrap database and compare.
There was a problem hiding this comment.
It was a wild guess, something to see what I'd get in a real-life run on TC
It turns out that my test runs have come back with results as low as ~359ish, I'll try a local bootstrap run as well
Rationale
This change appends a brief check to the end of SearchTest, to export the full-text index and verify some specific items that should be indexed are present. Ideally it also ensures no exceptions in the log arise as a result of exporting the index, and it ensures the full-text log has at least 2k rows
Related issue https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=51159
Related PR:
testAutomation helper to get file line count LabKey/testAutomation#2689